const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  transpileDependencies: true,
  configureWebpack: {
    resolve: {
      fallback: {
        // 添加Node.js polyfills
        path: false,
        fs: false
      }
    }
  },
  // 开发服务器配置
  devServer: {
    open: true,
    port: 8081,
    historyApiFallback: true,
    // 添加代理配置（如果需要的话）
    proxy: {
      '/api': {
        target: 'http://localhost:8080',
        changeOrigin: true,
        pathRewrite: {
          '^/api': '/api'
        }
      }
    }
  }
})
